home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / NUM2COLO.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  45 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Num2Color( nColor ) --> cColor
  8.  
  9. PARAMETERS:
  10.  
  11. nColor : Color number (NOT Clipper Color #, per se: see description)
  12.  
  13. SHORT:
  14.  
  15. Convert Clipper INTERNAL color number to color string.
  16.  
  17. DESCRIPTION:
  18.  
  19. _Num2Color() translates the numbers that Clipper uses internally to represent
  20. color ATTRIBUTES.  THIS IS NOT THE SAME THING AS CLIPPER'S COLOR NUMBERS (ie,
  21. 0-Black, 1-Blue, etc).
  22.  
  23. nColor is usually extracted from a savescreen() coordinate, and the number
  24. represents a complete color attribute, not an individual color.
  25.  
  26. For instance, the number 202 represents " G+* / R " to Clipper. This function
  27. is used by _ColorSay() which shows it's correct usage.
  28.  
  29. Do NOT feed this function Clipper @ SAY/GET color numbers! Psychadelic-drug
  30. hallucination-like mayhem may result!  But, hey, it might be interesting to
  31. try it anyway!
  32.  
  33. NOTE:
  34.  
  35.  
  36.  
  37. EXAMPLE:
  38.  
  39. _Num2Color(substr(screensave(5,10,5,10),2,1))
  40.  
  41. Result: The current color attribute at 5,10 is returned as a color
  42. string: FORE/BACK.
  43.  
  44. ******************************************************************************/
  45.